<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<script type="text/javascript">
$(document).ready(function(){
	$("h1").css({
		"margin":"10px 0"
	});
	var instruction = "만족도 선택후 반드시 등록해 주세요. 미등록시 탑승내역에 남지 않습니다.";
	$("textarea").val(instruction);
	$("textarea").click(function(){
		if($("textarea").val() == instruction){
			$("textarea").val("");
		}
	});
	$("form").submit(function(){
		if($("select.rating").val().trim() == "선택"){
			alert("만족도를 선택해 주세요");
			return false;		
		}
	});
});
/*
 */
</script>
<h1>글쓰기</h1>
<form action="/kosta_project_final_taxi/insertHistory.do" method="post">
<table>
	<tr>
		<th>만족도</th>
		<td align="center">
			<select class="rating" name="rating">
				<option>선택</option>
				<option value=5>★★★★★</option>
				<option value=4>★★★★</option>
				<option value=3>★★★</option>
				<option value=2>★★</option>
				<option value=1>★</option>
			</select>
		</td>
 	</tr> 
 	<tr>
		<td align="center" colspan=2>
		<textarea cols="75" rows="15" name="ratingComment"></textarea>
		</td>
	</tr>
	<tr align="right">
 		<td colspan="4" align="center">
	 		<input type="submit" value="등록">
	 		<input type="reset" value="초기화">
	 	</td>
	</tr>
</table>
</form>